package com.ztom.test

import com.ztom.beans.factory.support.extenssions.getBean
import com.ztom.context.support.ClassPathXmlApplicationContext
import com.ztom.test.bean.Person
import kotlin.test.Test
import kotlin.test.assertEquals

/**
 * @author ZhangTao
 */
class Test07ApplicationContext {

    @Test
    fun test() {
        val context = ClassPathXmlApplicationContext("classpath:spring-07-application-context.xml")

        val person = context.getBean<Person>()
        println(person)
        assertEquals(person.age, 27)

        context.close()
    }
}